import 'package:flutter/material.dart';
import 'package:note/ViewModel/login_vm.dart';
import 'package:note/routes/routes.dart';
import '../routes/routes.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';

void main() {
  

  runApp(
    MultiProvider(
    providers: [
    ChangeNotifierProvider(create: (_) => login_vm()),
    
  ],
  child: MyApp(),
)
);
}
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates:[

        GlobalMaterialLocalizations.delegate,

        GlobalWidgetsLocalizations.delegate
      ], 
      supportedLocales:[
        const Locale('zh','CH'),
        const Locale('en','US'),
      ],
      navigatorKey: navigatorKey,
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
      
        primarySwatch: Colors.blue,
      ),
      initialRoute: '/',
      onGenerateRoute: onGenerateRoute,
    );
  }
}
